<template>
  <el-config-provider :locale="appStore.locale" :size="appStore.size">
    <router-view />
    <!-- 文件上传 -->
    <NewUploadDialog ref="newUploadDialog" :fileData="dialogStore.fileData" @clearFileData="clearFileDataHandler" />
  </el-config-provider>
</template>

<script setup lang="ts">
import useSettingsStore from '@/store/modules/settings'
import { useUploadDialogStore } from '@/store/modules/uploadDialog'
import { handleThemeStyle } from '@/utils/theme'
import useAppStore from '@/store/modules/app'
import NewUploadDialog from '@/views/components/newUploadDialog/index.vue'

const appStore = useAppStore()
const dialogStore = useUploadDialogStore() // 引入上传对话框的 Store
const newUploadDialog = ref(null)

onMounted(() => {
  nextTick(() => {
    dialogStore.setDialogRef(newUploadDialog.value)
    // 初始化主题样式
    // handleThemeStyle(useSettingsStore().theme);

  })
})

const clearFileDataHandler = () => {
  dialogStore.fileData = []
}

// const openUploadDialog = () => {
//   newUploadDialog.value?.showProgress(); // 打开
// };
// const closeUploadDialog = () => {
//   newUploadDialog.value?.hideProgress(); // 关闭
// };



</script>
<style>
.el-radio input[aria-hidden="true"] {
  display: none !important;
}

.el-radio:focus:not(.is-focus):not(:active):not(.is-disabled) .el-radio__inner {
  box-shadow: none !important;
}

.el-checkbox input[aria-hidden="true"] {
  display: none !important;
}

.el-checkbox:focus:not(.is-focus):not(:active):not(.is-disabled) .el-radio__inner {
  box-shadow: none !important;
}
</style>

<style lang="scss" scoped></style>
